﻿using Basic.FlowGatewayModule.Interface;
using Basic.FlowRemoteModel.NodeFormData;
using Basic.FlowRemoteModel.NodeFormData.Model;

namespace Basic.FlowGatewayModule.lmpl
{
    internal class NodeFormDataRelationService : INodeFormDataRelationService
    {
        public DataRelation[] Gets ( long nodeId )
        {
            return new GetsFormDataRelation
            {
                NodeId = nodeId
            }.Send();
        }

        public void Sync ( long flowId, long nodeId, DataRelation[] adds )
        {
            new SetFormDataRelation
            {
                NodeId = nodeId,
                FlowId = flowId,
                Relations = adds
            }.Send();
        }
    }
}
